<?php
/**
 * Created by PhpStorm.
 * User: George
 * Date: 2017/9/27
 * Time: 16:41
 */

namespace AdminBundle\Task;


trait ApiMowhereTrait
{
    protected $isHttps = false;
    protected $host = 'admin.bjtwtx.com';
    protected $basePath = 'api';

    protected function getUrl($path)
    {
        $http = $this->isHttps ? 'https' : 'http';
        return sprintf('%s://%s/%s/%s', $http, $this->host, $this->basePath, $path);
    }
}